package com.asset.service.imp;

import com.asset.pojo.BranchOffice;
import com.asset.service.BaseService;
import com.asset.service.BranchOfficeService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by gongshaobo on 2017/2/17  15:47.
 */
@Service
public class BranchOfficeServiceImp extends BaseService implements BranchOfficeService {
    @Override
    public void addBranchOffice(BranchOffice branchOffice) {
        branchOfficeMapper.addBranchOffice(branchOffice);
    }

    @Override
    public BranchOffice getBranchOffice(Integer id) {
        BranchOffice branchOffice = branchOfficeMapper.getBranchOffice(id);
        return branchOffice;
    }

    @Override
    public BranchOffice getBranchOfficeByName(String name) {
        BranchOffice branchOffice = branchOfficeMapper.getBranchOfficeNyName(name);
        return branchOffice;
    }

    @Override
    public List<BranchOffice> listBranchOffice(String name) {
        List<BranchOffice> branchOfficeList = branchOfficeMapper.listBranchOffice(name);
        return branchOfficeList;
    }
}
